#直接空跑一次,  然后 break malloc.c 才会有效
run


set logging file malloc_print.log
set logging on

set print pretty on
set pagination off

set follow-exec-mode new
set follow-fork-mode child

set breakpoint pending on

directory /pubx/8cc-malloc-analyze/glibc-2.27/malloc/

#刚开始的时候 手工break malloc, 停下来后 bt看一下调用栈 发现停在 __GI___libc_malloc , 即 malloc == __GI___libc_malloc

#435:0x1B3
break *__GI___libc_malloc+0x1B3  if bytes>128
#523:0x20B
break *__GI___libc_malloc+0x20B  if bytes>128

# break malloc.c:3045 if bytes>128
# break malloc.c:3060 if bytes>128
# break malloc.c:3070 if bytes>128
# break malloc.c:3090 if bytes>128
commands 1-2
	silent
	printf "alloc_mem_size:%d, alloc_mem_addr:%x",bytes,victim
	python import time; st=time.time(); print("curentTime:%f" % st)
	continue
end


run

# quit